﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlCapNhatCapBacChoQuanLyTuyenNgoai.ascx.cs" Inherits="WebUserControl_ControlCapNhatCapBacChoQuanLyTuyenNgoai" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="uscTitleForm.ascx" tagname="uscTitleForm" tagprefix="uc1" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc1" %>
<script type="text/javascript">
     function pageLoad() {
       $("#<%= btAdd.ClientID %>").click(function() {
        if ($("#<%= txtMaBUM.ClientID %>").val().length>0) 
        {
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } });
        } 
        }); 
       $("#<%= btUpdate.ClientID %>").click(function() {
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } });
        }); 
        
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>  
<style type="text/css">
  .Field
  {
  	display:none;
  }
</style>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<uc1:uscTitleForm ID="uscTitleForm1" runat="server" Messeage="Cập nhật cấp bậc cho cấp quản lý tuyến ngoài" />
<uc1:uscMsgBox ID="uscMsgBox1"  runat="server" />
<table>
  <tr>
    <td>Tháng</td>
    <td>
      <asp:DropDownList  width="200px" ID="DropThang"  runat="server">
    </asp:DropDownList>
    </td>
    <td></td>
    <td></td>
  </tr>
  <tr>
  <td>Mã BUM</td>
  <td>Họ tên</td>
  <td>Cấp bậc</td>
   <td></td>
  </tr> 
   <tr>
  <td><asp:TextBox ID="txtMaBUM" width="100px" CausesValidation="false"  runat="server" AutoPostBack="true" 
          ontextchanged="txtMaBUM_TextChanged"></asp:TextBox></td>
  <td><asp:TextBox ID="txtHoTenBUM" BackColor="Yellow" ReadOnly="true" width="200px"  runat="server"></asp:TextBox>
   <asp:RequiredFieldValidator ControlToValidate="txtHoTenBUM" Display="None" ID="R1" runat="server" ErrorMessage="Phải nhập mã BA">
   </asp:RequiredFieldValidator>
                <cc1:ValidatorCalloutExtender TargetControlID="R1" 
                    ID="ValidatorCalloutExtender1" runat="server" Enabled="True">
                </cc1:ValidatorCalloutExtender>
  </td>
  <td><asp:DropDownList  width="200px" ID="DropCapBac"  runat="server"></asp:DropDownList></td>
  <td><asp:Button ID="btAdd" runat="server" Text="Thêm" onclick="btAdd_Click" /></td>
  </tr> 
  </table>
  <br />
  <fieldset>
   
        
      <asp:GridView ID="GridView1"  AutoGenerateColumns="False" runat="server" 
          CellPadding="4" ForeColor="#333333"  DataKeyNames="STT"
          GridLines="None"  onrowdeleting="GridView1_RowDeleting">
          <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
          <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
          <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
          <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
          <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
          <AlternatingRowStyle BackColor="White" />
          <Columns>
            <asp:BoundField DataField="STT" HeaderText="Số TT" ReadOnly="True" />
            <asp:BoundField DataField="MaBUM" HeaderText="Mã BUM"/>
            <asp:BoundField DataField="HoTen" HeaderText="Họ tên" ReadOnly="True" />
            <asp:BoundField DataField="CapBac" ItemStyle-HorizontalAlign="Center" HeaderText="Cấp bậc" ReadOnly="True" />
            <asp:BoundField DataField="Rate" HeaderStyle-CssClass="Field" FooterStyle-CssClass="Field" ItemStyle-CssClass="Field"   ItemStyle-HorizontalAlign="Center"/>
            <asp:BoundField DataField="Ngay" ItemStyle-HorizontalAlign="Center" HeaderText="Ngày" ReadOnly="True" />
            <asp:BoundField DataField="Recdate" HeaderStyle-CssClass="Field" ItemStyle-CssClass="Field" FooterStyle-CssClass="Field"  ItemStyle-HorizontalAlign="Center"/>
            <asp:CommandField ControlStyle-Height="25px" ControlStyle-Width="25px" ItemStyle-Height="25px" ItemStyle-Width="25px"  ButtonType="Image" DeleteText="Xóa" DeleteImageUrl="~/image/Symbol-Delete.png" CausesValidation="False" HeaderText="Xóa" 
                            ShowDeleteButton="True" />
               
          </Columns>
      </asp:GridView>
  
      <br />
  <div>
  
      <asp:Button ID="btUpdate" runat="server" Text="Cập nhật" CausesValidation="false" 
          onclick="btUpdate_Click" />
  
  </div>
  </fieldset>
</ContentTemplate>
</asp:UpdatePanel>